const Router = require('@koa/router')

const Book = require('../controllers/bookController')

const router = new Router({
    prefix: '/book',
})

router.post('/add', Book.create)

router.post('/update', Book.update)

router.delete('/:id', Book.remove)

router.get('/list', Book.findList)

router.get('/:id', Book.readDetails)

module.exports = router
